﻿	
using System;
using Conference.Core.Sal.DataContracts;
using Conference.Core.Sal.DataRequests;
using Conference.Core.Sal.DataResponses;
using Conference.Server.DL;

namespace Conference.Server.Synchronization
{
    public class SyncSpeaker : SyncEntityObject<
        SpeakerDataContract, 
        SpeakerDataResponse, 
        SpeakerDataRequest,
        Speaker>
    {
        public SyncSpeaker() 
            : base("Speakers")
        {
        }

		protected override SpeakerDataContract FromDatabase(Speaker item)
        {
            return new SpeakerDataContract()
                {
					Id = item.Id, 
					Created = item.Created, 
					CreatedBy = item.CreatedBy, 
					Modified = item.Modified, 
					ModifiedBy = item.ModifiedBy, 
					Name = item.Name, 
					Title = item.Title, 
					Company = item.Company, 
					Biography = item.Biography, 
		
                };
        }

        protected override void FromService(SpeakerDataContract item, Speaker entity)
        {
			entity.Id = item.Id; 
			entity.Created = item.Created; 
			entity.CreatedBy = item.CreatedBy; 
			entity.Modified = item.Modified; 
			entity.ModifiedBy = item.ModifiedBy; 
			entity.Name = item.Name; 
			entity.Title = item.Title; 
			entity.Company = item.Company; 
			entity.Biography = item.Biography; 
		
		}
	}
}

